package com.sykj;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import javax.servlet.MultipartConfigElement;
import java.sql.Date;
import java.text.SimpleDateFormat;

/**
 * @program: BeautyClub
 * @description: 启动类
 * @author: qiaoli
 * @create: 2020-07-21 08:39
 */
@SpringBootApplication
@MapperScan("com.sykj.mapper")
public class WeChatApplication {
    public static void main(String[] args) {
        SpringApplication.run(WeChatApplication.class);
    }
    @Bean
    public MultipartConfigElement multipartConfigElement() {
        MultipartConfigFactory factory = new MultipartConfigFactory();
        //文件最大
        factory.setMaxFileSize("50MB"); //KB,MB
        /// 设置总上传数据总大小
        factory.setMaxRequestSize("60MB");
        return factory.createMultipartConfig();
    }


}
